package com.spark.common.core.entity.system;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.spark.common.annotation.query.Query;
import com.spark.common.constants.QueryConstants;
import com.spark.common.core.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * 系统数据字典
 *
 * @author LYCHEE
 * @date 2025/02/20 10:20
 */
@Data
@TableName("sys_dict")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class SysDict extends BaseEntity {

    /**
     * 字典名称
     */
    @Query(QueryConstants.QUERY_LIKE)
    @NotBlank(message = "字典名称不能为空")
    private java.lang.String dictName;

    /**
     * 字典编码
     */
    @Query(QueryConstants.QUERY_LIKE)
    @NotBlank(message = "字典编码不能为空")
    private java.lang.String dictCode;

    /**
     * 备注
     */
    private java.lang.String remark;

    /**
     * 字典项
     */
    @TableField(exist = false)
    private List<SysDictItem> dictItems;
}
